Photoacoustic spectroscopy (PAS) may utilize the photoacoustic effect. The photoacoustic effect may include a conversion between light and acoustic waves due to absorption and localized thermal excitation. Light may be absorbed and transformed into kinetic energy. The absorption may result in local heating and a pressure/sound wave. The heat may vibrate the cantilever which is measured by chopping light on the cantilever. Alternatively, a measurement of the sound waves at different wavelengths may be used to generate a photoacoustic spectrum. In an open environment, it may be difficult to detect these waves. The waves may spread and stretch their energy outward and they may be exposed to environmental noise, which may reduce the range and sensitivity for producing a photoacoustic spectrum.